<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:sec="http://www.springframework.org/security/facelets/tags"
      xmlns:p="http://primefaces.org/ui">
    <f:view locale="#{localeController.locale}" contentType="text/html" encoding="UTF-8" id="principal">
        <h:head>
            <link rel="shortcut icon" href="#{facesContext.externalContext.requestContextPath}/resources/images/favicon.ico"
                  type="image/x-icon" />
            <title>
                <ui:insert name="pageTitle">
                    <h:outputText value="#{msg.tituloPrincipal}"/>
                </ui:insert>
            </title>
            <h:outputStylesheet library="css" name="standard.css" />
            <h:outputStylesheet library="css" name="icons.css" />
            <h:outputScript library="js" name="js.js" />
        </h:head>
        <h:body>
            <p:growl id="growl" showDetail="true" sticky="false" 
                     autoUpdate="true" globalOnly="true" showSummary="true" 
                     life="6000"/>  
            <h:panelGrid cellspacing="0" cellpadding="0" styleClass="wrapper">
                <h:panelGrid columns="1" columnClasses="menu,content">
                    <p:panel styleClass="menu" id="panelLayout">
                        <table width="100%">
                            <tr>
                                <td valign="middle">
                                    <h:link outcome="principal" id="logoPrincipalLink">
                                        <h:graphicImage id="img1" library="images" name="logo.png" styleClass="banner" />
                                    </h:link>
                                </td>
                                <td width="700px" valign="middle">
                                    <ui:insert name="menu">
                                        <ui:include src="include/menu.xhtml" />
                                    </ui:insert>
                                </td>
                                <td  valign="bottom">
                                    <table width="100%">
                                        <tr>
                                            <td>
                                                <h:outputText value="#{msg.ola},  
                                                              #{loginController.authenticationService.usuarioLogado.firstName}" 
                                                              style="color: #1484e6"/>
                                            </td>
                                        </tr>
                                        <tr><td>
                                                <ui:param name="font_id_color" value="#1484e6"/>
                                                <ui:include src="include/idioma.xhtml" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <p:separator id="separator" style="margin-top: -6px;"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" align="left">
                                    <ui:insert name="content" />
                                </td>
                            </tr>
                        </table>
                        <div id="j_idt12_footer" class="ui-panel-footer ui-widget-content">
                            <table width="100%">
                                <tr>
                                    <td valign="center" width="95%">
                                        <a href="http://code.google.com/p/minhas-arquiteturas/" target="_blank">#{msg.tituloPrincipal}</a>
                                    </td>
                                    <td valign="center">
                                        © 2012
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </p:panel>
                </h:panelGrid>
            </h:panelGrid>
            <div class="topstatus">
                <p:ajaxStatus id="topstatus">
                    <f:facet name="start">
                        <h:graphicImage library="images" name="ajax_1.gif" />
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputLabel value="" />
                    </f:facet>
                    <f:facet name="default">
                        <h:outputLabel value="" />
                    </f:facet>
                </p:ajaxStatus>
            </div>
        </h:body>
    </f:view>
</html>